Skip log accumulator disk spill when reading finished task logs - #70671
Open
jason810496 wants to merge 2 commits into
Open
Skip log accumulator disk spill when reading finished task logs#70671jason810496 wants to merge 2 commits into
jason810496 wants to merge 2 commits into
Conversation
jason810496
force-pushed
the
refactor/logging/bypass-accumulator-terminal-reads
branch
from
July 30, 2026 03:21
ff86435 to
d9fbcfb
Compare
Finished-task reads drop the log_pos continuation token from 3.4.0 onward, but the provider test matrix still runs against released cores (3.0-3.3) that emit it. Gate the S3, GCS, and WASB task-handler metadata assertions on AIRFLOW_V_3_4_0_PLUS so both the source run and the older-core compatibility runs pass.
jason810496
force-pushed
the
refactor/logging/bypass-accumulator-terminal-reads
branch
from
July 31, 2026 15:12
0fa14b3 to
b0d2376
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
part of the streaming task log series
Why
FileTaskHandler._readwraps every read inLogStreamAccumulator, which eagerly drains the whole merged log stream (5000 lines to memory, the rest to a tempfile on the API server) before the first byte reaches the client — only to get thetotal_linesfor the continuation token.For a finished task no continuation token is ever issued (
end_of_log=Trueon both the JSON and NDJSON paths), so the count is dead weight: every terminal-task read full-log downloads — pays a full-log disk write + read-back + re-parse and a time-to-first-byte equal to the whole drain, for nothing.What
FileTaskHandler._readbypassingLogStreamAccumulatorwhenend_of_logisTrue._interleave_logs(capped atHEAP_DUMP_SIZE, flushing half when full) is what bounds the read path, not the accumulator.Was generative AI tooling used to co-author this PR?